//
//  NewsTitle.m
//  19-JSON网易
//
//  Created by mafeng on 16/8/9.
//  Copyright © 2016年 mafeng. All rights reserved.
//

#import "NewsTitle.h"

@implementation NewsTitle

- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

+ (instancetype)newsWithDic:(NSDictionary *)dic {
    return [[NewsTitle alloc] initWithDic:dic];
}



- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"template"]) {
        _news_template = value;
    }
}

- (id)valueForUndefinedKey:(NSString *)key {
    return nil;
}

- (NSString *)description
{
    return [NSString stringWithFormat:@"%@, %@", _tname, _img];
}
@end
